#include <stdio.h>
#define MIN(a, b) ((a) < (b) ? (a) : (b))
#define X(a, b) a ## b

int findmin(int d[], int n)
{
    int i, m = d[0];
    X(f, or) (i = 1; i < n; i++) {
        m = MIN(m, d[i]);
    }
    return m;
}

int main()
{
    int n, i, d[100];
    scanf("%d", &n);
    for (i = 0; i < n; i++)
        scanf("%d", &d[i]);
    printf("%d\n", findmin(d, n));
    return 0;
}
